package codeCreate.service;

import com.alibaba.fastjson.JSON;

public class Test {
    public static void main(String[] args) {
        Integer[] integers = { 75, 4, 3, 75, 243, 87, 24, 65 };
        System.out.println(JSON.toJSONString(sort(integers)));
    }

    private static Integer[] sort(Integer[] integers) {
        int length = integers.length;
        for (int i = length - 1; i > 0; i--) {
            for (int j = 0; j < i; j++) {
                if (integers[j] > integers[j + 1]) {
                    int temp = integers[j];
                    integers[j] = integers[j + 1];
                    integers[j + 1] = temp;
                }
            }
        }
        return integers;
    }
}
